package com.hhf.rpa.InputDeviceMonitor.impl1;

import java.awt.*;
import java.util.Date;

/**
 * 监控鼠标动作，main为监控程序入口
 */
public class MainMonitor {
    static volatile Date last = new Date();

    public static void main(String[] args) throws Exception {
        System.out.println("正在监控中...");
        final Robot rb = new Robot();
        rb.delay(500);
        MouseHook mouseHook = new MouseHook();
        KeyboardHook keyboardHook = new KeyboardHook();
//        new Thread(mouseHook).start();
        new Thread(keyboardHook).start();
        new Thread(new KeyAlive()).start();
    }
}
